<!doctype html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title><?=$title;?></title>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<meta content="<?=$keyword;?>" name="keyword">
<meta content="<?=$description;?>" name="description">
<link type="text/css" href="<?=STATIC_URL;?>css/common.css" rev="stylesheet" rel="stylesheet">
<link type="text/css" href="<?=STATIC_URL;?>css/shop.css" rev="stylesheet" rel="stylesheet">
<link href="<?=STATIC_URL;?>favicon.ico" type="image/x-icon" rel="icon" />
<link href="<?=STATIC_URL;?>favicon.ico" type="image/x-icon" rel="shortcut icon" />
<!--[if IE 6]>
	<script type="text/javascript" src="js/DD_belatedPNG.js" ></script>
	<script type="text/javascript">
	DD_belatedPNG.fix('.trans,.box a:hover');
	</script>
<![endif]-->
<body>
<div id="container">
  <? include 'com-header.tpl.php'; ?>
  <!------------------------------------>
  <div class="intro">
    <div id="shop_box">
      <div class="shop_logo"> <a href="<?=$store['url'];?>"><img title="<?=h($store['name']);?>外卖" alt="<?=h($store['name']);?>外卖" width="168" height="130" src="<?=empty($store['picture']) ? STATIC_URL.'img/store_nopic.jpg' : UPLOAD_URL.$store['picture'];?>"></a> </div>
      <div class="shop_info">
        <div class="company">
          <h2><a href="<?=$store['url'];?>"><?=h($store['name']);?></a> <span title="3星" class="star level-7"></span> </h2>
          <div class="clear"></div>
        </div>
        <div class="distance">
          <p style="background-position:0 -180px;">营业时间<em><?=$store['service_time'];?></em></p>
          <p style="background-position:0 -200px;">最低消费<em><?=$store['min_charge'];?></em>元</p>
          <p style="background-position:0 -160px;">最低起送<em><?=$store['min_order'];?></em>份</p>
          <div class="clear"></div>
        </div>
        <div class="search_share">
	          <!-- JiaThis Button BEGIN -->
	          <div id="ckepop"> <span class="jiathis_txt">分享到：</span> <a class="jiathis_button_fav"></a> <a class="jiathis_button_tsina"></a> <a class="jiathis_button_tqq"></a> <a class="jiathis_button_kaixin001"></a> <a class="jiathis_button_fanfou"></a> <a class="jiathis_button_renren"></a> <a class="jiathis_button_tsohu"></a> <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a> </div>
	          <!-- JiaThis Button END -->
        </div>
      </div>
      <div class="shop_right">
        <div id="call_number">
			<a rel="<?=$encryptId;?>" href="javascript:void(0)" class="get_number">查看订餐电话</a>
        </div>
        <div class="call_info">为了确保您及时就餐，请提前订餐。</div>
        <div class="feed_num">
	        <ul>
	          <li><a href="#" class="num">54</a></li>
	          <li><a href="#">菜品</a></li>
	        </ul>
			<ul>
				<li><a href="#" class="num">16</a></li>
				<li><a href="#">关注</a></li>
	        </ul>
			<ul>
				<li><a href="#" class="num">4123</a></li>
				<li><a href="#">浏览</a></li>
	        </ul>
		</div>

      </div>
      <div class="clear"></div>
    </div>
    <p>&nbsp;</p>
    <div style="margin-bottom:59px;">
      <div id="dish_layout">
      	<div id="dish_mode">
      			<a href="<?=$store['url']?>/menu" class="menu<?php if($mode == 'menu') echo '-hover'; ?>"><span>菜单</span></a>
      			<a href="<?=$store['url']?>/foto" class="foto<?php if($mode == 'foto') echo '-hover'; ?>"><span>图片</span></a>
      			<a href="<?=$store['url']?>/list" class="list<?php if($mode == 'list') echo '-hover'; ?>"><span>列表</span></a>
      			<a class="name">浏览模式：&nbsp;</a>
      	</div>
		<?php
			if($mode == 'foto'){
				include 'shop-foto.tpl.php';
			}else{
				include 'shop-list.tpl.php';
			}
		?>
      </div>

      <div style="margin-left:12px;width:280px;float:left" class="cell">
        <div style="width:280px;">
<?php
/*
        <!--
          <div class="shop-cart">
            <h2 class="shop-bg"></h2>
            <div class="dish-wrap">
              <div class="page">
                <div class="item" id="cart_item_10032059">
                  <input type="checkbox" pid="10032059" checked="checked" class="radio-checkbox">
                  <label>江南私房蒸组合</label>
                  <input type="button" pid="10032059" value="-" class="sub">
                  <input type="text" pid="10032059" value="1" class="text" id="count_10032059">
                  <input type="button" pid="10032059" value="+" class="add">
                </div>
                <div class="item" id="cart_item_10032054">
                  <input type="checkbox" pid="10032054" checked="checked" class="radio-checkbox">
                  <label>秘制家乡鹅套餐</label>
                  <input type="button" pid="10032054" value="-" class="sub">
                  <input type="text" pid="10032054" value="1" class="text" id="count_10032054">
                  <input type="button" pid="10032054" value="+" class="add">
                </div>
              </div>
            </div>
            <div class="cart-split shop-bg"></div>
            <h3>总价：￥49</h3>
            <p> <span>餐点金额:37元</span>&nbsp; <span>外送费:12元</span> </p>
            <a onClick="return false;" href="#" id="btnSubmit" class="button shop-bg"></a>
            <div class="cart-bottom-line shop-bg"></div>
          </div>
        -->
        <!--
          <div class="notebox">
            <h3 class="important">店铺公告:</h3>
            <div>
              通过壹外卖订餐，付款时不能使用餐厅或其它第三方提供的任何形式的优惠券、抵用券。
			</div>
          </div>
        -->
*/
?>
          <div class="notebox" style="/*margin-top:20px;*/">
            <!--
            <h3 class="telphone">订餐电话:</h3>
            <div>
              <?php if($store['call_number']){ ?>400-8832-1234转<?php echo $store['call_number']; }else{ echo $store['telphone']; } ?>
			</div>
            -->

            <h3 class="address">店铺地址:</h3>
            <div>
              <?php if($store['city_deliver']){echo '全城配送';}else{echo $bigzone.$subzone. h($store['address']);} ?>
			</div>
            <h3 class="delivery">送餐时间:</h3>
            <div>
            	<?php
            		$delivery_time = explode(' ', $store['delivery_time']);
            		if($delivery_time[1]){
            			echo '上午：'.$delivery_time[0];
            			echo '<br />';
            			echo '下午：'.$delivery_time[1];
 	           		}else{
 	           			echo $delivery_time[0];
 	           		}
            	?>
            </div>
            <h3 class="important">重要提示:</h3>
            <div>
              为保证送餐及时，请提前1个小时订餐。
			</div>
          </div>
          <div id="baidu_map" style="margin:20px 0;border:1px #ccc solid;height:280px">
          </div>

		  <div class="notebox">
            <div class="album_title"><a href="#">全部</a>关注的人(187)</div>
			<ul class="albumbox">
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/1"></a></li>
					<li><a href="#"><img alt="" src="http://tp4.sinaimg.cn/1954043923/30/5603956359/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/1980478177/30/1298338084/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/2010577105/30/5613475028/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp4.sinaimg.cn/1954043923/30/5603956359/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/1980478177/30/1298338084/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/2010577105/30/5613475028/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/1"></a></li>
					<li><a href="#"><img alt="" src="http://tp4.sinaimg.cn/1954043923/30/5603956359/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/1980478177/30/1298338084/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/2010577105/30/5613475028/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/1"></a></li>
					<li><a href="#"><img alt="" src="http://tp4.sinaimg.cn/1954043923/30/5603956359/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/1980478177/30/1298338084/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/2010577105/30/5613475028/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/1"></a></li>
					<li><a href="#"><img alt="" src="http://tp4.sinaimg.cn/1954043923/30/5603956359/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp1.sinaimg.cn/1248305544/30/5601168813/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/1980478177/30/1298338084/0"></a></li>
					<li><a href="#"><img alt="" src="http://tp2.sinaimg.cn/2010577105/30/5613475028/0"></a></li>
			</ul>
			<div class="clear"></div>
          </div>

        </div>
      </div>
	  <div class="clear"></div>
	</div>
  </div>

  <!------------------------------------>
  <? include 'com-footer.tpl.php'; ?>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script>
<script type="text/javascript" src="<?=STATIC_URL;?>js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
<script type="text/javascript">
function initMap(lng, lat){
	var level = 16;

	if(!lng || !lat){
		lng = 121.623517;
		lat = 38.911717;
		level = 13;
	}

	var map = new BMap.Map("baidu_map");//在百度地图容器中创建一个地图
	var point = new BMap.Point(lng, lat);//定义一个中心点坐标

	map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
	map.disableScrollWheelZoom();//启用地图滚轮放大缩小(可不写)
	map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
	map.disableKeyboard();//禁用键盘上下左右键移动地图，默认禁用(可不写)

	map.centerAndZoom(point, level);
	map.panTo(point);

	//var iconimg = "http://api.map.baidu.com/library/MarkerTool/1.2/src/images/us_mk_icon.png";
	var iconimg = "<?=STATIC_URL;?>img/map_flag.gif";
	var icon = new BMap.Icon(iconimg, new BMap.Size(40, 43));

	//覆盖层
	var marker = new BMap.Marker(point);
	marker.setIcon(icon);

	map.addOverlay(marker);
}
$(document).ready(function() {

	$(".get_number").click(function(){
		$.get('/tools/getWaimaiTel?code=' + $(this).attr("rel"),
			function(result){
				$(".get_number").parent().html("订餐电话<br />" + result);
			}
		);
	});

	$(".menu").find("li").mouseover(function(){
		$(this).addClass("hover");
	}).mouseout(function(){
		$(this).removeClass("hover");
	});

	if($(".dish_foto").get(0)){ //照片模式
		var $menu = $(".dish_foto").find(".menu");
		$menu.hide();
		$($menu.get(0)).show();

		var $catelink = $("ul.category").find("a");
		$($catelink.get(0)).addClass("current");

		$catelink.click(function(){
			$catelink.removeClass("current");
			$(this).addClass("current");

			var idx = $(this).attr("ref");
			$menu.hide();
			$($menu.get(idx)).show();
		});
	}

	initMap('<?=$store['longitude'];?>', '<?=$store['latitude'];?>');
});
</script>
</body>
</html>
